#include <bits/stdc++.h>

using namespace std;
using ll = long long;
const int N = 150010;

int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    string s;
    cin >> s;
    int a = s[0] - '0', b = s[1] - '0', c = s[2] - '0';
    cout << 111*(a+b+c) << endl;
    return 0;
}